#pragma once
#include "Background.h"
#include "define.h"


class BackgroundManager
{
private:
	Background forward;
	Background middle;
	Background back;

	static const int FRAME_NUM_X = 1,
					FRAME_NUM_Y = 1,
					FRAME_MAX = FRAME_NUM_X * FRAME_NUM_Y;

	int forward_graph[FRAME_MAX],
		middle_graph[FRAME_MAX],
		back_graph[FRAME_MAX];

	const float *current_camera_x, *current_camera_y;
	float old_camera_x,
		old_camera_y,
		move_x,
		move_y;
public:
	void init( void );
	void carryCamera( const float *camera_x, const float *camera_y );
	void calc( void );
	void drawForward( void );
	void drawMiddle( void );
	void drawBack( void );
	void fin( void );
};